package cn.com.mrAdv01;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

//s01 jack M 10000 -- <"M", "s01 jack M 10000">
//MAP -- map() -- partition()

public class MySelfPartitioner extends Partitioner<Text, Text> {

	@Override
	public int getPartition(Text key, Text value, int numPartitions) {
		return ("M".equals(key.toString()) ? 0 : 1) % numPartitions;
	}

}
